const {Schema,model} = require('mongoose')

let HotelSchema = new Schema({
	himg:String,
	hname:String,
	valuation:String,
	address:String,
	distance:String,
	price:Number,
	rooms:[
			{id:Number,name:String,oldeprice:Number,price:Number,count:Number},
			{id:Number,name:String,oldeprice:Number,price:Number,count:Number},
			{id:Number,name:String,oldeprice:Number,price:Number,count:Number},
			{id:Number,name:String,oldeprice:Number,price:Number,count:Number},
		],
	reply:[{
			commentuname:{type:String,index:true},
			commentutel:{type:String,index:true},
			value:{type:Number,index:true},
			commentContent:{type:String,index:true},
			createTime:{type:Date,default:Date.now(),index:true}
		}]
})
// CommonJS模块开发 ：向外界传递这个model
module.exports = model('Hotel',HotelSchema)